﻿namespace TestingConcurrencyBenchmark.ProblemFactories
{
    /// <summary>
    /// An interface that acts as a template for all problemfactories
    /// </summary>
    /// <typeparam name="T">The type of solutions to problems this factory can produce</typeparam>
    public interface IProblemFactory<T>
    {
        /// <summary>
        /// Returns a solution of a problem that should be bug-free
        /// </summary>
        /// <returns>the bug-free solution</returns>
        T GetSolution();

        /// <summary>
        /// Returns a solution of a problem containing a deadlock
        /// </summary>
        /// <returns>the solution with deadlock</returns>
        T GetSolutionWithDeadlock();

        /// <summary>
        /// Returns a solution containing a racecondition
        /// </summary>
        /// <returns>the solution with racecondition</returns>
        T GetSolutionWithRaceCondition();

        /// <summary>
        /// Returns a solution containing a datarace
        /// </summary>
        /// <returns>the solution with datarace</returns>
        T GetSolutionWithDatarace();
    }
}